using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._WorkflowManagerTools._Jobs
{
    /// <summary>
    /// <para>Post Job Version</para>
    /// <para>Post the current version edits to the parent version of the job.</para>
    /// <para>将当前版本的编辑发布到作业的父版本。</para>
    /// </summary>    
    [DisplayName("Post Job Version")]
    public class PostJobVersion : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public PostJobVersion()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_Input_JobID">
        /// <para>Input Job ID</para>
        /// <para>The ID for the job whose edits from the job's version are going to be posted to it's parent version.</para>
        /// <para>作业的 ID 从作业版本进行的编辑将发布到其父版本。</para>
        /// </param>
        public PostJobVersion(object _Input_JobID)
        {
            this._Input_JobID = _Input_JobID;
        }
        public override string ToolboxName => "Workflow Manager Tools";

        public override string ToolName => "Post Job Version";

        public override string CallName => "wmx.PostJobVersion";

        public override List<string> AcceptEnvironments => [];

        public override object[] ParameterInfo => [_Input_JobID, _Input_DatabasePath, _Output_Status];

        /// <summary>
        /// <para>Input Job ID</para>
        /// <para>The ID for the job whose edits from the job's version are going to be posted to it's parent version.</para>
        /// <para>作业的 ID 从作业版本进行的编辑将发布到其父版本。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Job ID")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _Input_JobID { get; set; }


        /// <summary>
        /// <para>Input Database Path</para>
        /// <para>The Workflow Manager (Classic) database connection file that contains the job information. If no connection file is specified, the current default Workflow Manager (Classic) database will be used.</para>
        /// <para>包含作业信息的 Workflow Manager （Classic） 数据库连接文件。如果未指定连接文件，则将使用当前默认的 Workflow Manager （Classic） 数据库。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Database Path")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _Input_DatabasePath { get; set; } = null;


        /// <summary>
        /// <para>Post Job Version Succeeded</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Post Job Version Succeeded")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public long? _Output_Status { get; set; }


        public PostJobVersion SetEnv()
        {
            base.SetEnv();
            return this;
        }

    }

}